package cn.schoolwow.util.module.check.instance.flow;

import cn.schoolwow.quickflow.domain.FlowContext;
import cn.schoolwow.quickflow.flow.BusinessFlow;

public class CheckInstanceNotNullFlow implements BusinessFlow {
    @Override
    public void executeBusinessFlow(FlowContext flowContext) throws Exception {
        Object value = flowContext.getData("value");
        String message = (String) flowContext.checkData("message");

        if(null==value){
            throw new IllegalArgumentException(message+"不能为空");
        }
    }

    @Override
    public String name() {
        return "实例-检查NULL字段";
    }
}
